Field of the Invention
The present invention relates to information handling systems. More specifically, embodiments of the invention relate to optimizing complex SQL statements.
Description of the Related Art
As the value and use of information continues to increase, individuals and businesses seek additional ways to process and store information. One option available to users is information handling systems. An information handling system generally processes, compiles, stores, and/or communicates information or data for business, personal, or other purposes thereby allowing users to take advantage of the value of the information. Because technology and information handling needs and requirements vary between different users or applications, information handling systems may also vary regarding what information is handled, how the information is handled, how much information is processed, stored, or communicated, and how quickly and efficiently the information may be processed, stored, or communicated. The variations in information handling systems allow for information handling systems to be general or configured for a specific user or specific use such as financial transaction processing, airline reservations, enterprise data storage, or global communications. In addition, information handling systems may include a variety of hardware and software components that may be configured to process, store, and communicate information and may include one or more computer systems, data storage systems, and networking systems.
Structured query language (SQL) is a special-purpose programming language designed for managing data held in a relational database management system (RDBMS), or for stream processing in a relational data stream management system (RDSMS). It is known to execute structured query language (SQL) statements on information handling systems to access and interact with a database, the combination of which is generally referred to as a SQL system. SQL statements may be long and complex.
It is known to perform a SQL rewrite operation to improve performance of a SQL statement. The SQL rewrite operation is often performed by user such as an experienced database administrator either manually (often referred to as a human SQL statement rewrite operation) or via computer executing a SQL rewrite algorithm having some form of artificial intelligence or embedded human knowledge (often referred to as a machine SQL statement rewrite operation). With a human SQL statement rewrite, the user can make use of heuristic knowledge and an understanding of data to provide a SQL statement rewrite that is usually more focused on a particular region of the SQL statement as the user would likely have knowledge regarding where the problem originates. However, the human SQL statement rewrite operation process is often time intensive and can require precise changes and sometimes repeated attempts to generate a solution. With a machine SQL statement rewrite operation, the computer can be much more efficient and precise when generating multiple statement rewrites. However, the machine SQL statement rewrite operation has no heuristic knowledge and understanding of data. Accordingly, the machine SQL statement rewrite operation often requires significant time and resource to resolve a complex SQL statement within a large search space.